 |
|
|
|
|
Summary |
|
|
|
| |
 |
|
|
|
|
Review Questions |
|
|
|
| |
 |
|
|
|
|
Exercises |
|
|
|
| |
|
|
|
|
|
7
Arrays, Types, and Constants |
|
|
|
| |
 |
|
|
|
|
Arrays |
|
|
|
| |
 |
|
|
|
|
Fixed-size Arrays |
|
|
|
| |
 |
|
|
|
|
Dynamic Arrays |
|
|
|
| |
 |
|
|
|
|
Preserving Array Contents |
|
|
|
| |
 |
|
|
|
|
Miscellaneous Array Topics |
|
|
|
| |
 |
|
|
|
|
Setting Array Boundaries |
|
|
|
| |
 |
|
|
|
|
The Array() Function |
|
|
|
| |
 |
|
|
|
|
The IsArray() Function |
|
|
|
| |
 |
|
|
|
|
Bounds Checking |
|
|
|
| |
 |
|
|
|
|
Clearing an Array |
|
|
|
| |
 |
|
|
|
|
Multidimensional Arrays |
|
|
|
| |
 |
|
|
|
|
User-defined Types |
|
|
|
| |
 |
|
|
|
|
Constants |
|
|
|
| |
 |
|
|
|
|
Local Constants |
|
|
|
| |
 |
|
|
|
|
Module-level Constants |
|
|
|
| |
 |
|
|
|
|
Public Constants |
|
|
|
| |
 |
|
|
|
|
Built-in Constants |
|
|
|
| |
 |
|
|
|
|
Mathematical and Relational Operators |
|
|
|
| |
 |
|
|
|
|
Relational or Comparison Operators |
|
|
|
| |
 |
|
|
|
|
Order of Precedence |
|
|
|
| |
 |
|
|
|
|
Summary |
|
|
|
| |
 |
|
|
|
|
Review Questions |
|
|
|
| |
 |
|
|
|
|
Exercises |
|
|
|
| |
|
|
|
|
|
8
Conditional Logic and Looping |
|
|
|
| |
 |
|
|
|
|
If . . . Then |
|
|
|
| |
 |
|
|
|
|
If . . . Then . . . End If |
|
|
|
| |
 |
|
|
|
|
The Else Clause |
|
|
|
| |
 |
|
|
|
|
The ElseIf Clause |
|
|
|
| |
 |
|
|
|
|
The IIf() Function |
|
|
|
| |
 |
|
|
|
|
Select Case |
|
|
|
| |
 |
|
|
|
|
Compiler Directives |
|
|
|
| |
 |
|
|
|
|
#If . . . Then . . . #Else . . . #End If |
|
|
|
| |
 |
|
|
|
|
Declaring a Global Compiler Constant |
|
|
|
| |
 |
|
|
|
|
Declaring a Module-level Compiler Constant |
|
|
|
| |
 |
|
|
|
|
Looping in VB |
|
|
|
| |
 |
|
|
|
|
Do While |
|
|
|
| |
 |
|
|
|
|
While . . . Wend |
|
|
|
| |
 |
|
|
|
|
Loop While |
|
|
|
| |
 |
|
|
|
|
Do Until |
|
|
|
| |
 |
|
|
|
|
Loop Until |
|
|
|
| |
 |
|
|
|
|
For . . . Next |
|
|
|
| |
 |
|
|
|
|
For . . . Next Step |
|
|
|
| |
 |
|
|
|
|
The For . . . Next Example |
|
|
|
| |
 |
|
|
|
|
Nested Constructs |
|
|
|
| |
 |
|
|
|
|
Exit For/Exit Do |
|
|
|
| |
 |
|
|
|
|
Exit Sub/Exit Function |
|
|
|
| |
 |
|
|
|
|
With . . . End With |
|
|
|
| |
 |
|
|
|
|
Summary |
|
|
|
| |
 |
|
|
|
|
Review Questions/Exercises |
|
|
|
| |
|
|
|
|
|
9
Procedures and Functions |
|
|
|
| |
 |
|
|
|
|
Procedures |
|
|
|
| |
 |
|
|
|
|
Naming Procedures |
|
|
|
| |
 |
|
|
|
|
Event/Subprocedures |
|
|
|
| |
 |
|
|
|
|
Scope of Procedures |
|
|
|
| |
 |
|
|
|
|
Creating a Procedure |
|
|
|
| |
 |
|
|
|
|
Calling Procedures |
|
|
|
| |
 |
|
|
|
|
Sub Main() Procedure |
|
|
|
| |
 |
|
|
|
|
Functions |
|
|
|
| |
 |
|
|
|
|
Creating a Function |
|
|
|
| |
 |
|
|
|
|
Calling Functions |
|
|
|
| |